import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import Login from '@/components/Login'
import Register from "@/components/Register"
import Nbcourse from "@/components/Nbcourse"
import CourseDetail from "../components/CourseDetail"
import Cart from "../components/Cart"
import Jiesuan from "../components/Jiesuan"
import Order from "../components/Order"
import Success from "../components/Success"
import Player from "../components/playervideo"

Vue.use(Router)

export default new Router({
  mode:'history',
  routes: [
    {
      path: '/',

      component: Home
    },
    {
      path: '/home',

      component: Home
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
   {
      name:"Register",
      path: "/register",
      component:Register,
    },
   {
      name:"Nbcourse",
      path: "/nbcourses/",
      component:Nbcourse,
    },
    {
      name:"coursedetail",
      path: "/coursedetail/:id/",
      component:CourseDetail,
    },
    {
      name:"Cart",
      path: "/cart",
      component:Cart,
    },
    {
      name:"Jiesuan",
      path: "/jiesuan",
      component:Jiesuan,
    },
    {
      name:"success",
      path: "/alipay/result/",
      component:Success,
    },
    {
      name:"order",
      path: "/order",
      component:Order,
    },
    {
      name:"Player",
      path: "/player/:vid/",
      component:Player,
    },
  ]
})
